import 'package:flutter/material.dart';
import 'package:zrjz/comm/widget/global_web/global_web_page.dart';
import 'package:zrjz/comm/widget/preview_photo_page.dart';
import 'package:zrjz/modules/auth/bind_phone/bind_phone_page.dart';
import 'package:zrjz/modules/auth/forget_psd/forget_psd_page.dart';
import 'package:zrjz/modules/auth/login/login_page.dart';
import 'package:zrjz/modules/auth/sign_up/sign_up_page.dart';

import 'package:zrjz/modules/main/main_page.dart';
import 'package:zrjz/modules/me/change_mobile/change_mobile_page.dart';

import 'package:zrjz/modules/me/dark_model/dark_model_page.dart';
import 'package:zrjz/modules/me/form_filed/form_filed_page.dart';
import 'package:zrjz/modules/me/notification_enable/notification_enable_page.dart';
import 'package:zrjz/modules/me/reset_password/reset_password_page.dart';
import 'package:zrjz/modules/me/setting/setting_page.dart';

import 'package:zrjz/modules/splash/splash_page.dart';
import 'package:get/get.dart';

part 'router_path.dart';

class PageRouter {
  static const INITIAL = RouterPath.SPLASH;

  static final routes = [
    GetPage(
      name: RouterPath.SPLASH,
      page: () => SplashPage(),
    ),
    GetPage(
      name: RouterPath.SETTING,
      page: () => SettingPage(),
    ),

    GetPage(
      name: RouterPath.RESETPASSWORD,
      page: () => ResetPasswordPage(),
    ),
    GetPage(
      name: RouterPath.CHANGEMOBILE,
      page: () => ChangeMobilePage(),
    ),

    //表单提交
    GetPage(
      name: RouterPath.FORMFILED,
      page: () => FormFiledPage(),
    ),

    //登录
    GetPage(
      name: RouterPath.AUTH_LOGIN,
      page: () => LoginPage(),
    ),

    //注册
    GetPage(
      name: RouterPath.AUTH_SIGNUP,
      page: () => SignUpPage(),
    ),

    //绑定手机
    GetPage(
      name: RouterPath.AUTH_BIND,
      page: () => BindPhonePage(),
    ),

    //忘记密码
    GetPage(
      name: RouterPath.AUTH_FORGET,
      page: () => ForgetPsdPage(),
    ),

    //首页
    GetPage(
      name: RouterPath.MAIN,
      page: () => MainPage(
        key: const ValueKey(RouterPath.MAIN),
      ),
    ),


    GetPage(
      name: RouterPath.NOTIFICATION_ENABLE,
      page: () => NotificationEnablePage(),
    ),

    GetPage(
      name: RouterPath.DARK_MODEL,
      page: () => DarkModelPage(),
    ),


    // 图片预览
    GetPage(
      name: RouterPath.PREVIEW_IMAGE,
      page: () => PreviewPhotoPage(),
      transition: Transition.noTransition,
    ),


    //全局公用的WebView
    GetPage(
      name: RouterPath.GLOBAL_WEB,
      page: () => GlobalWebPage(key: UniqueKey()),
    ),
  ];
}
